package admin

import (
	"context"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) PermissionTree(ctx context.Context, req *system.PermissionTreeReq) (res *system.PermissionTreeRes, err error) {
	res = new(system.PermissionTreeRes)
	res.Tree, err = service.SystemPermission().GetTree(ctx)
	return res, err
}
